﻿// This is an open source non-commercial project. Dear PVS-Studio, please check it.
// PVS-Studio Static Code Analyzer for C, C++ and C#: http://www.viva64.com

// ReSharper disable CheckNamespace
// ReSharper disable CommentTypo
// ReSharper disable IdentifierTypo
// ReSharper disable UnusedMember.Global
// ReSharper disable UnusedType.Global

/* SiberianButtonCell.cs -- ячейка с кнопкой
 * Ars Magna project, http://arsmagna.ru
 */

#region Using directives

using System.Windows.Forms;
using System.Windows.Forms.VisualStyles;

#endregion

#nullable enable

namespace ManagedIrbis.WinForms.Grid;

/// <summary>
/// Ячейка с кнопкой.
/// </summary>
public class SiberianButtonCell
    : SiberianCell
{
    #region Properties

    /// <summary>
    /// Текст в ячейке.
    /// </summary>
    public string? Text { get; set; }

    #endregion

    #region SiberianCell members

    /// <inheritdoc cref="SiberianCell.OnPaint"/>
    public override void OnPaint
        (
            PaintEventArgs args
        )
    {
        var graphics = args.Graphics;
        var rectangle = args.ClipRectangle;

        ButtonRenderer.DrawButton
            (
                graphics,
                rectangle,
                false,
                PushButtonState.Default
            );
    }

    #endregion

}
